<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<div>
    <ul>
        <li>JS1</li>
        <li>JS2</li>
        <li>JS3</li>
        <li>JS4</li>
        <li>JS5</li>
        <li>JS6</li>
    </ul>
</div>
<script>
    /*
    * 删除li的第四个元素:removeChild():都需要站在父元素的角度才能删除
    * */
    var li4 = document.querySelector("ul>li:nth-child(4)");
    li4.parentNode.removeChild(li4);

</script>
</body>
</html>